package com.aaa.ssm.controller;

import com.aaa.ssm.service.RevenueStatisticsService;
import com.aaa.ssm.util.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("RevenueStatisticsController")
public class RevenueStatisticsController extends BaseController{
    //依赖注入
    @Resource
    private RevenueStatisticsService revenueStatisticsService;

    /**
     * 查询景区表和订单表 以订单表为主 拿到当前月份的不同景区的营业额 景区名称 和时间
     * @param monthDay
     * @return
     */
    @PostMapping("queryByScenicAndOrder")
    public Result queryByScenicAndOrder(String monthDay, String scenicName){
        return success(revenueStatisticsService.queryByScenicAndOrder(monthDay,scenicName));
    }
}